package com.edu.service.impl;

import java.util.List;

import com.edu.bean.Page;
import com.edu.bean.Upkeep;
import com.edu.dao.UpkeepDao;
import com.edu.dao.impl.UpkeepDaoImpl;
import com.edu.service.UpkeepService;

public class UpkeepServiceImpl implements UpkeepService {
	UpkeepDao ud = new UpkeepDaoImpl();
	@Override
	public Page<Upkeep> selectUpkeepAll(Upkeep upkeep,int pageNum, int pageSize) {
		List<Upkeep> listupkeep = ud.selectUpkeepAll(pageNum, pageSize);
		int row = ud.selectupkeeptotal(upkeep);
		Page<Upkeep> page = new Page(listupkeep,pageNum,pageSize,row);
		return page;
	}

	@Override
	public int deleteupkeepById(int upkeepid) {
		// TODO Auto-generated method stub
		return ud.deleteupkeepById(upkeepid);
	}

	@Override
	public int updateUpkeep(Upkeep upkeep) {
		// TODO Auto-generated method stub
		return ud.updateUpkeep(upkeep);
	}

	@Override
	public Upkeep selectUpkeepById(int upkeepid) {
		// TODO Auto-generated method stub
		return ud.selectUpkeepById(upkeepid);
	}

	@Override
	public int addupkeep(Upkeep upkeep) {
		// TODO Auto-generated method stub
		return ud.addupkeep(upkeep);
	}

}
